home *** CD-ROM | disk | FTP | other *** search
/ Amiga Magazin: Amiga-CD 1996 September & October / Amiga-CD 1996 #9-10.iso / demos / storm-c / stormwizard / wizard install-script engl < prev   
Text File  |  1996-01-20  |  5KB  |  203 lines

  1. ; $VER: StormWIZARD V1.06 Install Version 1.02 (2.7.96)
  2. ; Installatiert StormWizard auf der Festplatte
  3. ;
  4. ; (c) 1996 HAAGE & PARTNER Computer GmbH
  5.  
  6. (complete 0)
  7.  
  8. ; Die Versionsnummer und das Erstellungs-Datum der hier installierten
  9. ; Versionen.
  10.  
  11. (set stw-version "1.06")
  12. (set stw-date "(25 Jun 96)")
  13.  
  14. ;====================================================================
  15. ; Initialisierungen
  16.  
  17. (set @default-dest "")
  18.  
  19. (set os-version (/ (getversion) 65536))
  20. (set os-13 (< os-version 36))
  21. (set os-20 (>= os-version 36))
  22. (set os-21 (>= os-version 38))
  23.  
  24. (set totalmem (database "total-mem")) ; Diese schöne Funktion vereinfacht einiges
  25.  
  26. ; Die Pfadnamen der Programme, die vom Installations-Skript aufgerufen werden.
  27.  
  28. ; Die Pfadnamen der einzelnen Quell-Dateien.
  29.  
  30. (set #libfile                (tackon (pathonly @icon) "LIBS/Wizard.library"))        ; Hier stehen die Bibliothek
  31.  
  32. (set #prp-copy-lib
  33.     "Copy the WIZARD-LIBRARY\n")
  34. (set #hlp-copy-lib
  35.     "You can´t do anything without the Library!")
  36. (set #prp-copy-all
  37.     "Copy all files for StormWIZARD on your harddisc!\n")
  38. (set #hlp-copy-all (cat
  39.     "You can start StormWIZARD from the CD!\n"
  40.     "If you want to do so, you have to\n"
  41.     "install the Wizard.library into the LIBS: folder."))
  42.  
  43. ; ----------------------------- Prozeduren ------------------------------
  44.  
  45. (Procedure Make_Folder
  46.     (
  47.     (set folder (tackon folder "StormWIZARD"))
  48.     (if (= (exists folder) 0)
  49.        (
  50.        (makedir folder (infos))
  51.        )
  52.     ))
  53. )
  54.  
  55. ;=====================================================================================
  56. ; Beginn der Installation
  57. ;=====================================================================================
  58.  
  59. ; Eine kleine Einleitung, gefolgt vom Startbild des Installers.
  60.  
  61. (set folder "WORK:StormWIZARD")
  62.  
  63. (set act-user-level @user-level)
  64. (user 1)
  65.  
  66. (message (cat    "\nWelcome to the installation of the \n\n\"StormWIZARD demo "
  67.  
  68.                      stw-version " of the "stw-date "\"!\n\n"
  69.  
  70.                     "This script copies the files needed by StormC "
  71.  
  72.                     "to your harddisk.\n\n\n"
  73.                     "© Copyright 1996 HAAGE & PARTNER Computer GmbH"))
  74.  
  75. (user act-user-level)
  76. (welcome)
  77.  
  78.  
  79. (complete 5)
  80.  
  81. (set act-user-level @user-level)
  82.  
  83. (user act-user-level)
  84.  
  85.  
  86. (set ok 0)
  87. (while (not ok)
  88.     (set folder
  89.         (askdir
  90.             (prompt (cat "\n"
  91.                              "Select a path for your StormWIZARD installation.\n"
  92.                              "A drawer named StormWIZARD will be created!"))
  93.             (help (cat    "    You will get an overview of all volumes with 'Show drives' "
  94.                             "Form this list you should select the first, non colored, items. "
  95.                             "only\n"
  96.                             "    Typical names are \"WORK:\", \"HD0:\" or \"DH0:\"; "
  97.                             "do not use such names as \"DF0:\", \"DF1:\", "
  98.                             "\"DF2:\", \"DF3:\", \"RAD:\", \"RAM:\", \"System2.0:\", "
  99.                             "\"WB_2.x:\", \"System3.0:\" or \"WB_3.x:\"!"
  100.                             "\n\n"
  101.                             "The Storm C installation can not be placed on a volume directly. "
  102.                             "You have to select a drawer. Ohterwise an error will be shown. "
  103.                             "\n\n"
  104.                             @askdir-help))
  105.             (default folder)
  106.             (disk)
  107.         )
  108.     )
  109.  
  110.    (Make_Folder)    ; // Automatisch neues Verzeichnis anlegen!
  111.  
  112.     ; Ist der Dateiname leer oder endet mit einem ':' oder existiert unter
  113.     ; diesem Namen kein Verzeichnis, wird eine Fehlermeldung angezeigt; andernfalls
  114.     ; kann die Auswahl-Schleife beendet werden.
  115.     (if (or (or (or (<= (strlen folder) 0) (= (substr folder (- (strlen folder) 1) 1) ":")) (= (exists folder (noreq)) 0)) (= (getdiskspace folder) -1))
  116.         (message (cat    "\nYour selection \"" folder "\" is not a valid "
  117.                             "drawer !\n\n"
  118.                             "Use 'Show drives' to get a list of all volumes. "
  119.                             " Form this list you should only select the first, non color, items. "
  120.                             "\n"
  121.                             "Use \"New drawer...\" to create a new drawer on the current "
  122.                                "volume."))
  123.  
  124.         ;else
  125.         (
  126.             (set freediskspace (getdiskspace folder))    ; Der freie Speicher auf diesem Medium
  127.  
  128.             (if (< freediskspace size-komplett)
  129.                 (
  130.                 (user 1)
  131.                 (message (cat    "\nThere is not enough free space on the volume you "
  132.                                             "selected for the complete installation of StormWIZARD. "
  133.                                             "\n\n"
  134.                                             "Free diskspace " freediskspace "!\n"
  135.                                             "diskspace needed " size-komplett "!\n\n"
  136.                                             "Please select another volume !"))
  137.  
  138.                 )
  139.             ;else
  140.             (set ok 1)
  141.             )
  142.         )
  143.     )
  144. )
  145.  
  146. (makeassign "STORMWIZARD")
  147.  
  148. (user act-user-level)
  149.  
  150. (set @default-dest folder)    ; Die Zuweisung ist sehr wichtig!
  151.  
  152. (copyfiles                                            ; Alles kopieren
  153.     (prompt #prp-copy-all)
  154.     (help #hlp-copy-all)
  155.     (source (pathonly @icon))
  156.     (dest folder)
  157.     (all)
  158.     (confirm)
  159. )
  160. ; Wizard.Library in die Libs-Schublade kopieren!
  161.  
  162. (copylib
  163.     (prompt #prp-copy-lib)
  164.     (help #hlp-copy-lib)
  165.     (source #libfile)
  166.     (dest "LIBS:")
  167.     (confirm)
  168. )
  169.  
  170. (complete 95)
  171.  
  172. ; ------- STARTUP ÄNDERN
  173.  
  174. (set command1 (cat  "ASSIGN STORMWIZARD: " folder ""))
  175.  
  176. (set command1.txt
  177.     (cat 
  178.          "\n\n\nThere User-Startup must be changed to get StromWIZARD "
  179.       "work right.\n\n"
  180.          command1
  181.     )
  182. )
  183.  
  184. (startup "StormWIZARD"
  185.     (prompt command1.txt)
  186.     (help #help-startup)
  187.     (command command1)
  188. )
  189.  
  190. (makeassign "STORMWIZARD")
  191. (makeassign "STORMWIZARD" folder)
  192.  
  193. (complete 100)
  194.  
  195. ; ------- FERTIG
  196.  
  197. (message (cat 
  198.     "\nInstallation of StormWIZARD is done.\n"
  199.    "When the lines:\n" command1 "\nare not inserted in your Startup-Sequence or "
  200.    "User-Startup, please do it by your own.\n\n"
  201.    "\n\nBest wishes ... ")
  202. )
  203.